﻿@*@{
    Layout = null;
}*@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>青橙酒店</title>
    <link rel="stylesheet" href="/layuimini/lib/layui-v2.6.3/css/layui.css">
    <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
</head>
<body style="background-color:#dddddd;">
    <div style="background-color:white; width:1200px; height:350px; margin:auto; padding-top:25px;">
        <div style="background-color:#009688; width:1150px; height:25px; margin:auto; padding-top:5px; color:white;">
            <span style="margin-left:130px;">房型</span>
            <span style="margin-left:270px;">早餐</span>
            <span style="margin-left:150px;">人数</span>
            <span style="margin-left:150px;">价格</span>
        </div>
        <div style="margin-top:25px; margin-left:25px;">
            <img src="~/img/豪华单人床.jpg" style="width:230px;height:230px;" />
            <div style="width:700px;height:160px; margin-top:55px; margin-right:50px; float:right;">
                <span id="StandId" style="display:none"></span>
                <div style="height:80px">
                    <span style="margin-right:130px;">不含早</span>
                    <img src=~/img/人形图.png style="width:30px; height:30px;" />
                    <span style="margin-right:130px;">x2</span>
                    <span style="margin-right:130px;">原&nbsp;&nbsp;&nbsp;价：288</span>
                </div>
                <div style="height:80px">
                    <span style="margin-right:130px;">不含早</span>
                    <img src=~/img/人形图.png style="width:30px; height:30px;" />
                    <span style="margin-right:130px;">x2</span>
                    <span style="margin-right:130px;">会员价：268</span>
                    <button type="button" class="layui-btn" onclick="AppointmentStand()" id="safetyTime" name="safetyTime" style="width:100px; position:relative; bottom:40px;">预定</button>
                </div>
            </div>
            <div style="width:200px; padding-left:80px; padding-top:5px;">
                <span>豪华单人床</span>
            </div>
        </div>
    </div>
    <div style="background-color:white; width:1200px; height:300px; margin:auto; margin-top:25px; ">
        <div style="margin-top:25px; margin-left:25px;">
            <img src="~/img/豪华双人床.jpg" style="width:230px;height:230px;" />
            <div style="width:700px;height:160px; margin-top:55px; margin-right:50px; float:right; ">
                <span id="DoublesId" style="display:none"></span>
                <div style="height:80px">
                    <span style="margin-right:130px;">不含早</span>
                    <img src=~/img/人形图.png style="width:30px; height:30px;" />
                    <span style="margin-right:130px;">x2</span>
                    <span style="margin-right:130px;">原&nbsp;&nbsp;&nbsp;价：288</span>
                </div>
                <div style="height:80px">  
                    <span style="margin-right:130px;">不含早</span>
                    <img src=~/img/人形图.png style="width:30px; height:30px;" />
                    <span style="margin-right:130px;">x2</span>
                    <span style="margin-right:130px;">会员价：268</span>
                    <button type="button" class="layui-btn" onclick="AppointmentDoubles()" id="safetyTime" name="safetyTime" style="width:100px; position:relative; bottom:40px;">预定</button>
                </div>
            </div>
            <div style="width:200px; padding-left:80px; padding-top:5px;">
                <span>豪华双人床</span>
            </div>
        </div>
    </div>
    <div style="background-color:white; width:1200px; height:300px; margin:auto; margin-top:25px;">
        <div style="margin-top:25px; margin-left:25px;">
            <img src="~/img/豪华套房.jpg" style="width:230px;height:230px;" />
            <div style="width:700px;height:160px; margin-top:55px; margin-right:50px; float:right;">
                <span id="LuxuriousId" style="display:none"></span>
                <div style="height:80px">
                    <span style="margin-right:130px;">不含早</span>
                    <img src=~/img/人形图.png style="width:30px; height:30px;" />
                    <span style="margin-right:130px;">x4</span>
                    <span style="margin-right:130px;">原&nbsp;&nbsp;&nbsp;价：488</span>
                </div>
                <div style="height:80px"> 
                    <span style="margin-right:130px;">不含早</span>
                    <img src=~/img/人形图.png style="width:30px; height:30px;" />
                    <span style="margin-right:130px;">x4</span>
                    <span style="margin-right:130px;">会员价：468</span>
                    <button type="button" class="layui-btn" onclick="AppointmentLuxurious()" id="safetyTime" name="safetyTime" style="width:100px; position:relative; bottom:40px;">预定</button>
                </div>
            </div>
            <div style="width:200px; padding-left:80px; padding-top:5px;">
                <span>豪华套房</span>
            </div>
        </div>
    </div>
    <div style="background-color:white; width:1200px; height:300px; margin:auto; margin-top:25px;">
        <div style="margin-top:25px; margin-left:25px;">
            <img src="~/img/棋牌房.jpg" style="width:230px;height:230px;" />
            <div style="width:700px;height:160px; margin-top:55px; margin-right:50px; float:right;">
                <span id="ChessCardId" style="display:none"></span>
                <div style="height:80px">
                    <span style="margin-right:130px;">不含早</span>
                    <img src=~/img/人形图.png style="width:30px; height:30px;" />
                    <span style="margin-right:130px;">x2</span>
                    <span style="margin-right:130px;">原&nbsp;&nbsp;&nbsp;价：388</span>
                </div>
                <div style="height:80px">
                    <span style="margin-right:130px;">不含早</span>
                    <img src=~/img/人形图.png style="width:30px; height:30px;" />
                    <span style="margin-right:130px;">x2</span>
                    <span style="margin-right:130px;">会员价：368</span>
                    <button type="button" class="layui-btn" onclick="AppointmentChessCard()" id="safetyTime" name="safetyTime" style="width:100px; position:relative; bottom:40px;">预定</button>
                </div>
            </div>
            <div style="width:200px; padding-left:80px; padding-top:5px;">
                <span>豪华棋牌房</span>
            </div>
        </div>
    </div>
    <script src="~/js/laydate.js"></script>
    <script src="/layuimini/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述 JS 路径需要改成你本地的 -->
    <script>
         layui.use(['laydate'], function () {
                    layer = layui.layer;
                    $ = layui.$;
                    laydate = layui.laydate;

                    //执行一个laydate实例
            laydate.render({
                elem: '#safetyTime', //指定元素
                type: 'date',
				trigger: 'click' //采用click弹出
            });

                $.ajax({
                    url:"/RoomInfo/GetRoomtypeId",
                    type:"get",
                    success:function(res){
                        console.log(res);
                        $("#StandId").val(res.data[1].id);
                        $("#ChessCardId").val(res.data[2].id);
                        $("#DoublesId").val(res.data[3].id);
                        $("#LuxuriousId").val(res.data[0].id);
                    }
                })

                function Appointment(TypeId){
                    $.ajax({
                        url:"/Appointment/Appointment",
                        type:"post",
                        data:{"TypeId":TypeId},
                        success:function(res){
                            layer.msg(res.msg);
                        }
                    })
                }
                window.AppointmentStand = function(){
                    var TypeId = $("#StandId").val();
                    Appointment(TypeId);
                }
                window.AppointmentChessCard = function(){
                    var TypeId =  $("#ChessCardId").val();
                    Appointment(TypeId);
                }
                window.AppointmentDoubles = function(){
                    var TypeId =  $("#DoublesId").val();
                    Appointment(TypeId);
                }
                window.AppointmentLuxurious = function(){
                    var TypeId = $("#LuxuriousId").val();
                    Appointment(TypeId);
                }
        });

    </script>

</body>
</html>